{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3c017f3c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "新建空白EXCEL文件对象\n",
      "新建空白EXCEL文件对象\n",
      "新建空白EXCEL文件对象\n",
      "新建空白EXCEL文件对象\n",
      "新建空白EXCEL文件对象\n",
      "新建空EXCEL表单，地址为: E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\excel1.xlsx\n",
      "新建空EXCEL表单，地址为: E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\excel2.xlsx\n",
      "新建空EXCEL表单，地址为: E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\excelCopyResult.xlsx\n",
      "新建空EXCEL表单，地址为: E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\excelMatchResult.xlsx\n",
      "新建空EXCEL表单，地址为: E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\excelCleanResult.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\明日方舟干员档案（完整素材）.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材1：标准素材.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材2：存在空行.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材3：缺少列.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材4：缺失列信息.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材5：空白列.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材6：缺少行信息.xlsx\n",
      "E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材7：XLS.xls\n"
     ]
    }
   ],
   "source": [
    "from Model import *\n",
    "import pandas\n",
    "\n",
    "excellist = Excel_FileList()\n",
    "excellist.printlist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c8c447f4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在读取文件:>>>E:\\_电子设计与工程训练\\2_Python工程\\excel-processing-assistant\\EXCEL素材库\\素材2：存在空行.xlsx<<<\n",
      "工作表名称:明日方舟干员列表\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>代号</th>\n",
       "      <th>性别</th>\n",
       "      <th>职业</th>\n",
       "      <th>稀有度</th>\n",
       "      <th>分支</th>\n",
       "      <th>特性</th>\n",
       "      <th>出身地</th>\n",
       "      <th>种族</th>\n",
       "      <th>身高</th>\n",
       "      <th>矿石病感染情况</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>W</td>\n",
       "      <td>女</td>\n",
       "      <td>狙击</td>\n",
       "      <td>6.0</td>\n",
       "      <td>炮手</td>\n",
       "      <td>输出控场</td>\n",
       "      <td>卡兹戴尔</td>\n",
       "      <td>萨卡兹</td>\n",
       "      <td>165cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>阿</td>\n",
       "      <td>男</td>\n",
       "      <td>特种</td>\n",
       "      <td>6.0</td>\n",
       "      <td>怪杰</td>\n",
       "      <td>支援输出</td>\n",
       "      <td>龙门</td>\n",
       "      <td>菲林</td>\n",
       "      <td>161cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3.0</td>\n",
       "      <td>艾丽妮</td>\n",
       "      <td>女</td>\n",
       "      <td>近卫</td>\n",
       "      <td>6.0</td>\n",
       "      <td>剑豪</td>\n",
       "      <td>爆发输出控场</td>\n",
       "      <td>伊比利亚</td>\n",
       "      <td>黎博利</td>\n",
       "      <td>156cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>359</th>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>360</th>\n",
       "      <td>254.0</td>\n",
       "      <td>杜林</td>\n",
       "      <td>女</td>\n",
       "      <td>术师</td>\n",
       "      <td>2.0</td>\n",
       "      <td>中坚术师</td>\n",
       "      <td>新手</td>\n",
       "      <td>未公开</td>\n",
       "      <td>杜林</td>\n",
       "      <td>131cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>255.0</td>\n",
       "      <td>黑角</td>\n",
       "      <td>男</td>\n",
       "      <td>重装</td>\n",
       "      <td>2.0</td>\n",
       "      <td>铁卫</td>\n",
       "      <td>新手</td>\n",
       "      <td>东国</td>\n",
       "      <td>鬼</td>\n",
       "      <td>180cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>256.0</td>\n",
       "      <td>巡林者</td>\n",
       "      <td>男</td>\n",
       "      <td>狙击</td>\n",
       "      <td>2.0</td>\n",
       "      <td>速射手</td>\n",
       "      <td>新手</td>\n",
       "      <td>未公开</td>\n",
       "      <td>萨弗拉</td>\n",
       "      <td>179cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>257.0</td>\n",
       "      <td>夜刀</td>\n",
       "      <td>女</td>\n",
       "      <td>先锋</td>\n",
       "      <td>2.0</td>\n",
       "      <td>尖兵</td>\n",
       "      <td>新手</td>\n",
       "      <td>东国</td>\n",
       "      <td>鬼</td>\n",
       "      <td>161cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>364 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        编号    代号    性别    职业  稀有度    分支      特性   出身地    种族     身高  \\\n",
       "0      1.0     W     女    狙击  6.0    炮手    输出控场  卡兹戴尔   萨卡兹  165cm   \n",
       "1      2.0     阿     男    特种  6.0    怪杰    支援输出    龙门    菲林  161cm   \n",
       "2      3.0   艾丽妮     女    近卫  6.0    剑豪  爆发输出控场  伊比利亚   黎博利  156cm   \n",
       "3      NaN  None  None  None  NaN  None    None  None  None   None   \n",
       "4      NaN  None  None  None  NaN  None    None  None  None   None   \n",
       "..     ...   ...   ...   ...  ...   ...     ...   ...   ...    ...   \n",
       "359    NaN  None  None  None  NaN  None    None  None  None   None   \n",
       "360  254.0    杜林     女    术师  2.0  中坚术师      新手   未公开    杜林  131cm   \n",
       "361  255.0    黑角     男    重装  2.0    铁卫      新手    东国     鬼  180cm   \n",
       "362  256.0   巡林者     男    狙击  2.0   速射手      新手   未公开   萨弗拉  179cm   \n",
       "363  257.0    夜刀     女    先锋  2.0    尖兵      新手    东国     鬼  161cm   \n",
       "\n",
       "               矿石病感染情况  \n",
       "0     参照医学检测报告，确认为感染者。  \n",
       "1    参照医学检测报告，确认为非感染者。  \n",
       "2    参照医学检测报告，确认为非感染者。  \n",
       "3                 None  \n",
       "4                 None  \n",
       "..                 ...  \n",
       "359               None  \n",
       "360  参照医学检测报告，确认为非感染者。  \n",
       "361   参照医学检测报告，确认为感染者。  \n",
       "362  参照医学检测报告，确认为非感染者。  \n",
       "363   参照医学检测报告，确认为感染者。  \n",
       "\n",
       "[364 rows x 11 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ef = Excelfile(excellist.list[2])\n",
    "ef.df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "838a6daf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>编号</th>\n",
       "      <th>代号</th>\n",
       "      <th>性别</th>\n",
       "      <th>职业</th>\n",
       "      <th>稀有度</th>\n",
       "      <th>分支</th>\n",
       "      <th>特性</th>\n",
       "      <th>出身地</th>\n",
       "      <th>种族</th>\n",
       "      <th>身高</th>\n",
       "      <th>矿石病感染情况</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "      <td>W</td>\n",
       "      <td>女</td>\n",
       "      <td>狙击</td>\n",
       "      <td>6.0</td>\n",
       "      <td>炮手</td>\n",
       "      <td>输出控场</td>\n",
       "      <td>卡兹戴尔</td>\n",
       "      <td>萨卡兹</td>\n",
       "      <td>165cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.0</td>\n",
       "      <td>阿</td>\n",
       "      <td>男</td>\n",
       "      <td>特种</td>\n",
       "      <td>6.0</td>\n",
       "      <td>怪杰</td>\n",
       "      <td>支援输出</td>\n",
       "      <td>龙门</td>\n",
       "      <td>菲林</td>\n",
       "      <td>161cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3.0</td>\n",
       "      <td>艾丽妮</td>\n",
       "      <td>女</td>\n",
       "      <td>近卫</td>\n",
       "      <td>6.0</td>\n",
       "      <td>剑豪</td>\n",
       "      <td>爆发输出控场</td>\n",
       "      <td>伊比利亚</td>\n",
       "      <td>黎博利</td>\n",
       "      <td>156cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4.0</td>\n",
       "      <td>艾雅法拉</td>\n",
       "      <td>女</td>\n",
       "      <td>术师</td>\n",
       "      <td>6.0</td>\n",
       "      <td>中坚术师</td>\n",
       "      <td>输出削弱</td>\n",
       "      <td>莱塔尼亚</td>\n",
       "      <td>卡普里尼</td>\n",
       "      <td>145cm</td>\n",
       "      <td>体表有源石结晶分布，参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5.0</td>\n",
       "      <td>安洁莉娜</td>\n",
       "      <td>女</td>\n",
       "      <td>辅助</td>\n",
       "      <td>6.0</td>\n",
       "      <td>凝滞师</td>\n",
       "      <td>减速输出支援</td>\n",
       "      <td>叙拉古</td>\n",
       "      <td>沃尔珀</td>\n",
       "      <td>162cm</td>\n",
       "      <td>体表有源石结晶分布，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>252</th>\n",
       "      <td>253.0</td>\n",
       "      <td>12F</td>\n",
       "      <td>男</td>\n",
       "      <td>术师</td>\n",
       "      <td>2.0</td>\n",
       "      <td>扩散术师</td>\n",
       "      <td>新手</td>\n",
       "      <td>不明</td>\n",
       "      <td>萨弗拉</td>\n",
       "      <td>181cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>253</th>\n",
       "      <td>254.0</td>\n",
       "      <td>杜林</td>\n",
       "      <td>女</td>\n",
       "      <td>术师</td>\n",
       "      <td>2.0</td>\n",
       "      <td>中坚术师</td>\n",
       "      <td>新手</td>\n",
       "      <td>未公开</td>\n",
       "      <td>杜林</td>\n",
       "      <td>131cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>254</th>\n",
       "      <td>255.0</td>\n",
       "      <td>黑角</td>\n",
       "      <td>男</td>\n",
       "      <td>重装</td>\n",
       "      <td>2.0</td>\n",
       "      <td>铁卫</td>\n",
       "      <td>新手</td>\n",
       "      <td>东国</td>\n",
       "      <td>鬼</td>\n",
       "      <td>180cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>255</th>\n",
       "      <td>256.0</td>\n",
       "      <td>巡林者</td>\n",
       "      <td>男</td>\n",
       "      <td>狙击</td>\n",
       "      <td>2.0</td>\n",
       "      <td>速射手</td>\n",
       "      <td>新手</td>\n",
       "      <td>未公开</td>\n",
       "      <td>萨弗拉</td>\n",
       "      <td>179cm</td>\n",
       "      <td>参照医学检测报告，确认为非感染者。</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>256</th>\n",
       "      <td>257.0</td>\n",
       "      <td>夜刀</td>\n",
       "      <td>女</td>\n",
       "      <td>先锋</td>\n",
       "      <td>2.0</td>\n",
       "      <td>尖兵</td>\n",
       "      <td>新手</td>\n",
       "      <td>东国</td>\n",
       "      <td>鬼</td>\n",
       "      <td>161cm</td>\n",
       "      <td>参照医学检测报告，确认为感染者。</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>257 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        编号    代号 性别  职业  稀有度    分支      特性   出身地    种族     身高  \\\n",
       "0      1.0     W  女  狙击  6.0    炮手    输出控场  卡兹戴尔   萨卡兹  165cm   \n",
       "1      2.0     阿  男  特种  6.0    怪杰    支援输出    龙门    菲林  161cm   \n",
       "2      3.0   艾丽妮  女  近卫  6.0    剑豪  爆发输出控场  伊比利亚   黎博利  156cm   \n",
       "3      4.0  艾雅法拉  女  术师  6.0  中坚术师    输出削弱  莱塔尼亚  卡普里尼  145cm   \n",
       "4      5.0  安洁莉娜  女  辅助  6.0   凝滞师  减速输出支援   叙拉古   沃尔珀  162cm   \n",
       "..     ...   ... ..  ..  ...   ...     ...   ...   ...    ...   \n",
       "252  253.0   12F  男  术师  2.0  扩散术师      新手    不明   萨弗拉  181cm   \n",
       "253  254.0    杜林  女  术师  2.0  中坚术师      新手   未公开    杜林  131cm   \n",
       "254  255.0    黑角  男  重装  2.0    铁卫      新手    东国     鬼  180cm   \n",
       "255  256.0   巡林者  男  狙击  2.0   速射手      新手   未公开   萨弗拉  179cm   \n",
       "256  257.0    夜刀  女  先锋  2.0    尖兵      新手    东国     鬼  161cm   \n",
       "\n",
       "                        矿石病感染情况  \n",
       "0              参照医学检测报告，确认为感染者。  \n",
       "1             参照医学检测报告，确认为非感染者。  \n",
       "2             参照医学检测报告，确认为非感染者。  \n",
       "3    体表有源石结晶分布，参照医学检测报告，确认为感染者。  \n",
       "4             体表有源石结晶分布，确认为感染者。  \n",
       "..                          ...  \n",
       "252           参照医学检测报告，确认为非感染者。  \n",
       "253           参照医学检测报告，确认为非感染者。  \n",
       "254            参照医学检测报告，确认为感染者。  \n",
       "255           参照医学检测报告，确认为非感染者。  \n",
       "256            参照医学检测报告，确认为感染者。  \n",
       "\n",
       "[257 rows x 11 columns]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ef.df = ef.df.dropna(how='all', axis='index')\n",
    "ef.df = ef.df.reset_index(drop = True)\n",
    "ef.df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c5d22c31",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
